﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Zwms.Data.BusinessObjects;
using Zwms.Data.CommonObject;

namespace Zwms.Client.ManageWms
{
    public partial class StockDetailUC : UserControl
    {
        public StoGoodsStock SelectedRecord { get; set; }
        public StockDetailUC()
        {
            InitializeComponent();
            SelectedRecord = null; 
        }

        public void LoadStockDetail(StoGoodsStock queryRecord,ref PagerIndex pageIndex)
        {
            ServiceReferenceZwms.ServiceZwmsClient client = new ServiceReferenceZwms.ServiceZwmsClient();
            try
            {
                this.Cursor = Cursors.WaitCursor;
                IList<StoGoodsStock> recordList = client.QueryGoodsStockList(queryRecord, ref pageIndex);
                this.stoGoodsStockBindingSource.DataSource = null;
                if (recordList.Count > 0)
                {
                    this.stoGoodsStockBindingSource.DataSource = recordList;
                }
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }


    }
}
